package top.swle.austers.mapper;

import top.swle.austers.bean.Objects;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ObjectsMapper {
    @Insert("INSERT INTO lostandfound(kind,info,lostOrFoundDate,imgAddress,tag,currentHost) VALUES " +
            "(#{kind},#{info},#{lostOrFoundDate},#{imgaddress},#{tag},#{currentHost})")
    void IssueLost(Objects objects);
//    @Select("SELECT * FROM lostandfound WHERE kind LIKE CONCAT('%',#{kind},'%')")
    @Select("SELECT * FROM good WHERE kind LIKE CONCAT('%',#{kind},'%')")
    List<Objects> queryAll(Objects objects);
}
